Imports ToDoList.Usecases
Imports ToDoList.Views

Public Class ToDoListApplication

  ''' <summary>
  ''' Startup the application
  ''' </summary>
  ''' <remarks></remarks>
  Public Shared Sub Main()

    'create the views
    Dim lListView As New ToDoListForm()
    Dim lEditTaskView As New TaskDetailsForm()

    'create usecases
    Dim lEditTaskDetailsUsecase As New EditTaskDetailsUsecase(lEditTaskView)
    Dim lViewUsecase As New ManageTodoListUsecase(lListView, lEditTaskDetailsUsecase)
    Dim lSelectUsecase As New SelectTodoListUsecase(lListView, lViewUsecase)

    'pass usecases to views
    lListView.Usecases(lSelectUsecase, lViewUsecase)
    lEditTaskView.Usecases(lEditTaskDetailsUsecase)

    lSelectUsecase.Start()

  End Sub

End Class
